package com.tianhao.jenkins_server.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * TestController
 *
 * @author lrz
 * @title TestController
 * @projectName jenkins
 * @Date 2025/9/8 16:03
 */
@RestController
@RequestMapping("test")
public class TestController {

    @Value("${spring.application.name}")
    private String appName;

    @Value("${spring.profiles.active}")
    private String profile;

    @Value("${woman.name}")
    private String womanName;

    @Value("${git.environment.name}")
    private String envName;

    /**
     * 测试
     *
     * @return
     */
    @GetMapping
    public String test() {
        return "jenkins ->hello world:" + appName + "当前程序的的变量:" + profile + womanName + "当前环境：" + envName;
    }

    @GetMapping("delete")
    public String delete() {
        return "jenkins数据已被删除！";
    }

    @GetMapping("loan")
    public String loan() {
        return "获取额度成功";
    }
}
